/**
 * Created by mac on 2017/7/7.
 */
import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Dimensions,
    ScrollView,
    Image,
    FlatList,
} from 'react-native';

import {CachedImage} from "react-native-img-cache";

let width = Dimensions.get('window').width;


let data = require('./data.json').data.recommendChannel;
let promotionsData = data.promotions;

import SectionBar from './SectionBar';

export default class Promotions extends Component{

    render(){
        return (
            <View>
                <SectionBar title={data.titles.promotions}/>
                <FlatList
                    data={promotionsData}
                    renderItem={({item}) => <CachedImage style={{width:width,height:width/16*5}} source={{uri:item.pic}}/>}
                />
            </View>
        )
    }
}